<?php
class Mondano extends AppModel {

	var $name = 'Mondano';
	var $useTable = 'usuarios';
        var $actsAs = array('Sluggable' => array('label'=>'nick'));
        var $order = 'nick';
        var $recursive = 3;
	var $validate = array(
		'nome' => array('notempty'),
		'email' => array('rule'=>'email','allowEmpty'=>true),
		'senha' => array('notempty')
	);

        var $hasMany = array(
            'AplicativosUsuario' => array(
                'className' => 'AplicativosUsuario',
                'foreignKey' => 'usuario_id',
                'conditions' => '',
                'fields' => '',
                'order' => ''
            ),
            'Texto' => array(
                'className' => 'Texto',
                'foreignKey' => 'usuario_id',
                'conditions' => '',
                'fields' => '',
                'order' => 'Texto.created DESC'
            )
        );
}
?>